package com.blkbox.dp.observer.impl;

import com.blkbox.dp.observer.itf.IReader;

public class NormalReader implements IReader {
    private String name;
    private boolean passiveRcv;

    public NormalReader(String name, boolean passiveRcv) {
        this.name = name;
        this.passiveRcv = passiveRcv;
    }

    public boolean isPassiveRcv() {
        return passiveRcv;
    }

    public void receive(String message) {
        System.out.println(this.name + " received a message: " + message +"--[Passive: "+passiveRcv+"]");
    }

}
